import Cookies from "js-cookie";

const TokenKey = "Admin-Token";

export function getToken() {
  let t_token = Cookies.get(TokenKey);
  localStorage.setItem("t-token", t_token);
  return t_token;
}

export function setToken(token) {
  let result;
  result = Cookies.set(TokenKey, token);
  let t_token = Cookies.get(TokenKey);
  localStorage.setItem("t-token", t_token);
  return result;
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}
